PWD:=$(shell pwd)

ifeq ($(PREFIX),)
OUTPUTDIR:=$(PWD)/output
else
OUTPUTDIR:=$(PREFIX)
endif

ifeq ($(HOST),)
CROSS_COMPILE:=
HOSTNAME:=host
else
CROSS_COMPILE:=$(HOST)-
HOSTNAME:=$(HOST)
endif

ifeq ($(SHARED),yes)
LINKTYPE:=shared
else
LINKTYPE:=static
endif

ifeq ($(OS_TYPE),OS_UNIXLIKE)
OSTYPE:=OS_UNIXLIKE
else
OSTYPE:=OS_NONUNIX
endif


all:
	@$(PWD)/build $(HOSTNAME) $(LINKTYPE) $(OUTPUTDIR) $(OSTYPE) 
	@echo -e "\033[33m\033[1m==>build opensource successfully.\033[0m"
.PHONY: clean
clean:
	@$(PWD)/clean
